//TODO use something like pop() to remove the last item...

import java.util.ArrayList;

class BiblioList extends Bibliotheque
{
	protected ArrayList<Ouvrage> al;

	public BiblioList()
	{
		al = new ArrayList<Ouvrage>();
	}

	public void add(Ouvrage ov)
	{
		ov.setCote(count);
		al.add(ov);
		count++;
	}

	public void remove(int cote)
	{
		if (count == 0)
			throw new UnsupportedOperationException();
		else
		{
			count--;
			al.remove(cote);
		}
	}

	public Ouvrage get(int cote)
	{
		if (cote<0 || cote>=count)
			throw new ArrayIndexOutOfBoundsException();
		else
			return al.get(cote);
	}

}
